#include "GLRenderer.h"
#include "Sprite.h"
#ifdef WIN32
#include <windows.h>
#endif

#include <GL/gl.h>

using namespace neiderra::rendering;

void glRenderer::render(Sprite* sprite)
{
    glPushAttrib(GL_CURRENT_BIT);
	glColor3f(sprite->color.x, sprite->color.y, sprite->color.z);
		
	glBegin(GL_TRIANGLES);
		glVertex3f(sprite->coords[0].x, sprite->coords[0].y, sprite->coords[0].z);
		glVertex3f(sprite->coords[1].x, sprite->coords[1].y, sprite->coords[1].z);
		glVertex3f(sprite->coords[2].x, sprite->coords[2].y, sprite->coords[2].z);
	glEnd();

	glPopAttrib();
}
